package com.example.logistics_oa.controller;

import com.example.comment_oa.pojos.XgJiaban;
import com.example.comment_oa.pojos.XgKaoqin;
import com.example.comment_oa.pojos.XgZhiweibutie;
import com.example.comment_oa.pojos.XgZhiweijiben;
import com.example.comment_oa.pojos_vo.JILuBuTieVo;
import com.example.comment_oa.pojos_vo.JiLuZhiWeiJiBenVo;
import com.example.comment_oa.response.AjaxResponse;
import com.example.logistics_oa.service.XgJiabanService;
import com.example.logistics_oa.service.XgKaoqinService;
import com.example.logistics_oa.service.XgZhiweibutieService;
import com.example.logistics_oa.service.XgZhiweijibenService;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description:
 * @Author:李博文
 * @Date:2022/10/24 19:36
 * 查询修改记录表
 */
@RestController
@RequestMapping("/logisticsOa")
@CrossOrigin
public class SelectXgBiaoController {
    @Autowired
    XgZhiweijibenService xgZhiweijibenService;
    @Autowired
    XgZhiweibutieService xgZhiweibutieService;
    @Autowired
    XgJiabanService xgJiabanService;
    @Autowired
    XgKaoqinService xgKaoqinService;

    @PostMapping("/JiLuBiao/jiben")
    public AjaxResponse slectalljiben(@RequestBody JiLuZhiWeiJiBenVo jiLuZhiWeiJiBenVo){

        List<XgZhiweijiben> xgZhiweijibens = xgZhiweijibenService.selectALl(jiLuZhiWeiJiBenVo);
        return AjaxResponse.success(xgZhiweijibens);
    }

    @PostMapping("/JiLuBiao/zhiwei")
    public AjaxResponse selectZhiWei(@RequestBody JILuBuTieVo jiLuBuTieVo){
//        System.err.println("进来了吗？");
//        System.err.println(jiLuBuTieVo);
        List<XgZhiweibutie> xgZhiweibuties = xgZhiweibutieService.selectAll(jiLuBuTieVo);
        return AjaxResponse.success(xgZhiweibuties);
    }
    @PostMapping("/JiLuBiao/jiaban")
    public AjaxResponse selectjiaban(){
        List<XgJiaban> xgJiabans = xgJiabanService.selectAll();
        return AjaxResponse.success(xgJiabans);
    }
    @PostMapping("/JiLuBiao/kaoqin")
    public AjaxResponse selectkaoqin(){
        List<XgKaoqin> xgKaoqins = xgKaoqinService.selectAll();
        return AjaxResponse.success(xgKaoqins);
    }

}
